// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

.comments {
  @_top: comments;
  @_header-spacing: 20px;

  --comments-bg-hsl: var(--hsl-b5);
  --comments-fg: hsl(var(--hsl-c1));
  --comments-pinned-bg-hsl: var(--hsl-b4);
  --comments-separator-bg: hsl(var(--hsl-b6));
  --comments-toolbar-bg: hsl(var(--hsl-b4));
  display: flex;
  flex-direction: column;
  background-color: hsl(var(--comments-bg-hsl));
  color: var(--comments-fg);

  &--page-extra {
    --comments-bg-hsl: var(--hsl-b4);
    --comments-pinned-bg-hsl: var(--hsl-b3);
    --comments-separator-bg: hsl(var(--hsl-b5));
    --comments-toolbar-bg: hsl(var(--hsl-b3));
    // avoid overriding rounded corner of the page
    background-color: transparent;

    @media @desktop {
      margin-bottom: 0;
    }
  }

  &__count {
    font-size: 80%;
    padding: 5px 10px;
    margin-left: 5px;
    border-radius: 10000px;
    font-weight: bold;
    background-color: @osu-colour-b6;
    color: @osu-colour-f1;
  }

  &__items {
    padding: 10px 0;

    &--empty {
      .default-gutter-v2();
      padding-top: 40px;
      padding-bottom: 40px;
    }

    &--loading {
      opacity: 0.5;
    }

    &--toolbar {
      .default-gutter-v2();
      display: flex;
      justify-content: space-between;
      background-color: var(--comments-toolbar-bg);
    }

    &--pinned {
      margin-top: 20px;
      --comments-bg-hsl: var(--comments-pinned-bg-hsl);
      background-color: hsl(var(--comments-bg-hsl));
    }
  }

  &__new {
    .default-gutter-v2();
    padding-top: @_header-spacing;
    padding-bottom: @_header-spacing;
  }

  &__title {
    .default-gutter-v2();
    padding-top: @_header-spacing;
    padding-bottom: 0;
    font-size: @font-size--title-small-4;
    font-style: normal;
    margin: 0;
    color: @osu-colour-l1;
  }
}
